package demo5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-06-01
 * Time: 13:29
 */
public class Test {
    public static void fuc1(Animal animal){

    }

    public static Animal fuc2(){
        Dog dog = new Dog("旺财",5);
        return dog;
    }


    public static void main(String[] args) {
        Animal animal = new Dog("旺财",5);
        animal.eat();
    }

    public static void main2(String[] args) {
        Dog dog = new Dog("旺财",5);
        fuc1(dog);
    }

    public static void main3(String[] args) {
        Animal animal2 = fuc2();
    }
}
